import time

def bubble_sort(a):
    for i in range(len(a) - 1):
        for j in range(len(a) - i - 1):
            if a[j] > a[j + 1]:
                a[j], a[j + 1] = a[j + 1], a[j]
files=['m1_sorted.txt', "m2_reverse.txt", 'm3_shuffle.txt']
for file in files:
    with open(file, 'r') as f:
        nums = [int(line) for line in f]
    start_time = time.time()
    bubble_sort(nums)
    end_time = time.time()
    duration = int((end_time - start_time)*1000)
    file = file.split('')[0]
    print(f'file duration milliseconds')